﻿using System;
using System.Collections.Generic;
using System.Linq;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Input.Touch;
using Microsoft.Xna.Framework.Media;

namespace Pyramid_Game
{
    public class Space
    {
        Texture2D spaceTexture;
        Vector2 position;

        List<Space> possibleRoute = new List<Space>();

        bool isRoute = false;
        bool isHit = false;

        public Texture2D SpaceTexture
        {
            set { spaceTexture = value; }
            get { return spaceTexture; }
        }
        public Vector2 Position
        {
            set { position = value; }
            get { return position; }
        }
        public bool IsRoute
        {
            set { isRoute = value; }
            get { return isRoute; }
        }
        public bool IsHit
        {
            set { isHit = value; }
            get { return isHit; }
        }
        public List<Space> PossibleRoute
        {
            get { return possibleRoute; }
        }

        public Space(Texture2D texture, Vector2 position, bool isRoute)
        {
            this.spaceTexture = texture;
            this.position = position;
            this.isRoute = isRoute;
        }

        public void AddPossibleRoute(Space space)
        {
            possibleRoute.Add(space);
        }

        public void HitSpace(Texture2D texture)
        {
            spaceTexture = texture;
            isHit = true;
        }

        public void ReturnSpace(Texture2D texture)
        {
            spaceTexture = texture;
            isHit = false;
        }
    }
}
